package com.seaboxdata.controller;

import com.seaboxdata.entity.Sms;
import com.seaboxdata.service.SmsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

/**
 * @author
 * @create 2021-01-12 11:47
 **/

@RestController
@EnableAutoConfiguration
@RequestMapping("/sms")
public class SmsController {
    @Autowired
    private SmsService smsService;

    @RequestMapping("/sendSms")
    public Map<String, Object> getStatisticsData(@RequestBody Sms sms) {
        Map<String, Object> resultMap = new HashMap<String, Object>();
        String s = smsService.sendSms(sms);
        resultMap.put("retCode", "SUCCESS");
        return resultMap;
    }

}
